package com.boot.tomcatdemo.config;

import org.apache.struts.action.ActionServlet;
import org.springframework.boot.context.embedded.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.DispatcherServlet;

@Configuration
public class ServletConfig {


    /**
     * 拦截指定后缀 .mis
     * @param dispatcherServlet
     * @return
     */
  /*  @Bean
    public ServletRegistrationBean servletRegistrationBean(DispatcherServlet dispatcherServlet) {
        ServletRegistrationBean bean = new ServletRegistrationBean(dispatcherServlet);
        bean.addUrlMappings("*.mis");
        return bean;
    }*/
  /*  @Bean
    public ServletRegistrationBean strutsServlet(DispatcherServlet dispatcherServlet) {
        ServletRegistrationBean bean = new ServletRegistrationBean( );
        bean.setServlet(new ActionServlet ());
        bean.addUrlMappings("*.do");
        return bean;
    }*/
}
